<%@ taglib uri="/WEB-INF/lib/mentawai.jar" prefix="mtw" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<mtw:inputMaskConfig></mtw:inputMaskConfig>
<mtw:inputMoneyConfig />

<html>
    <head>
        <!--<meta content="text/html; charset=ISO-8859-1"
              http-equiv="content-type">-->
        <title></title>
    </head>
    <body>
        <form name="frmConProduto" method="post" action="MentaProduto.consultarProdutoNome.mtw" >

            <table border="1">

                <tr><td colspan="2" align="center" class="titulo">Cadastro de Produtos</td>
                <tr>
                    <td>Codigo:</td>
                    <td>
                        <mtw:inputMask name="txtCodigo" maskCustom="99" maxlength="4" size="4"></mtw:inputMask>
                        <font color="red">
                            <mtw:outError field="txtCodigo"><mtw:out />
                            </mtw:outError>
                        </font>
                <tr>
                    <td>Nome:</td>
                    <td><mtw:inputText name="txtNome" maxlength="100" size="30"  />
                        <font color="red">
                            <mtw:outError field="txtNome"><mtw:out /></mtw:outError>
                        </font>
                <tr>
                    <td>Descrição:</td>
                    <td><mtw:inputText  name="txtDescricao" maxlength="100" size="30"  />
                        <font color="red">
                            <mtw:outError field="txtDescricao"><mtw:out /></mtw:outError>
                        </font>
                <tr><td><input  name="btnPesquisar" type="submit" id="btnPesquisar" value="Pesquisar"  />
                        <input  name="btnLimpar" type="reset" id="btnLimpar" value="Limpar" /></td></tr>

            </table>
            <table border="1">
                <mtw:list value="listaProdutos">
                    <mtw:loop>
                        <tr>
                            <td>Codigo:</td>
                            <td><mtw:out value="codigo" /></td>
                        </tr>
                        <tr>
                            <td>Nome:</td>
                            <td><mtw:out value="nome" /></td>
                        </tr>
                        <tr>
                            <td>Descricao:</td>
                            <td><mtw:out value="descricao" /></td>
                        </tr>
                        <tr>
                            <td>Preço:</td>
                            <td><mtw:out value="preco" /></td>
                        </tr>
                        <tr>
                            <td>Foto:</td>
                            <td><img src="<mtw:contextPath />/img/<mtw:out value="foto" />" width="50" /></li></td>
                        </tr>
                    </mtw:loop>
                </mtw:list>
            </table>
        </form>
    </body>


    <script language="JavaScript">
        function submitFormConsultar(){
            document.frmCadProduto.action = "MentaProduto.consultarProdutoNome.mtw";
            document.frmCadProduto.submit();
        }
        
    </script>
</html>
